package com.github.kezhenxu94.playground.java.miscellaneous;

import org.junit.Test;

/**
 * Created by com.ikezhenxu.java.study on 12/23/14.
 */
public class AutoBoxing {

	@Test
	public void autoBoxing () {
		Short s1 = 3;
		Short s2 = s1;
		System.out.println ( s1 == s2 );
	}

	@Test
	public void autoBoxing0 () {
		Short s1 = 3;
		Short s2 = s1;
		Short s3 = ++s1;
		System.out.println ( ( s1 == s2 ) + " " + ( s1 == s3 )  );
		Short s4 = s1++;
		System.out.println ( ( s1 == s2 ) + " " + ( s1 == s3 ) + " " + ( s4 == s1 ) );
		System.out.println ( "s1 = " + s1 + ", s2 = " + s2 + ", s3 = " + s3 );
	}
}
